import request from './request'

// 用户登录
/**
 * @param {string} username -- 用户名
 * @param {string} password -- 密码
 * @returns {Promise<any>} 登录响应数据
 */
export function login(username: string, password: string): Promise<any> {
  return request({
    url: `api/loginByPassword?username=${username}&password=${password}`,
    method: 'post',
    
  })
}

export function test(): Promise<any> {
  return request({
    url: `api/profile`,
    method: 'get',
    
  })
}